var Company = {

    init:function () {
        var self = this;
        //Disable submit on text fields
        document.querySelector('form').onkeypress = self.preventEnterSubmit;
    },

    preventEnterSubmit:function (e) {
    if (e.which == 13) {
        var $targ = $(e.target);

        if (!$targ.is("textarea") && !$targ.is(":button,:submit")) {
            var focusNext = false;
            $(this).find(":input:visible:not([disabled],[readonly]), a").each(function(){
                if (this === e.target) {
                    focusNext = true;
                }
                else if (focusNext){
                    $(this).focus();
                    return false;
                }
            });
            return false;
        }
    }
}
};

/* when the page is loaded */
$(document).ready(function () {
    Company.init();
});